﻿using nRoute.Components;
using System.ComponentModel;
using System.Runtime.Serialization;

namespace nRoute.Samples.OfficerXcel.Model
{
    [DataContract]
    public class CommonSettings : INotifyPropertyChanged
    {
        private bool _miniToolbar = true;
        private bool _livePreview = true;
        private bool _developerTab;
        private bool _fullView = true;
        private int _colorScheme;
        private int _screenTip;

#region Properties

        [DataMember]
        public bool MinToolbar
        {
            get
            {
                return _miniToolbar;
            }
            set
            {
                if (_miniToolbar != value)
                {
                    _miniToolbar = value;
                    PropertyChanged.Notify(() => MinToolbar);
                }
            }
        }

        [DataMember]
        public bool LivePreview
        {
            get
            {
                return _livePreview;
            }
            set
            {
                if (_livePreview != value)
                {
                    _livePreview = value;
                    PropertyChanged.Notify(() => LivePreview);
                }
            }
        }

        [DataMember]
        public bool DeveloperTab
        {
            get
            {
                return _developerTab;
            }
            set
            {
                if (_developerTab != value)
                {
                    _developerTab = value;
                    PropertyChanged.Notify(() => DeveloperTab);
                }
            }
        }

        [DataMember]
        public bool FullView
        {
            get
            {
                return _fullView;
            }
            set
            {
                if (_fullView != value)
                {
                    _fullView = value;
                    PropertyChanged.Notify(() => FullView);
                }
            }
        }

        [DataMember]
        public int ColorScheme
        {
            get
            {
                return _colorScheme;
            }
            set
            {
                if (_colorScheme != value)
                {
                    _colorScheme = value;
                    PropertyChanged.Notify(() => ColorScheme);
                }
            }
        }

        [DataMember]
        public int ScreenTip
        {
            get
            {
                return _screenTip;
            }
            set
            {
                if (_screenTip != value)
                {
                    _screenTip = value;
                    PropertyChanged.Notify(() => ScreenTip);
                }
            }
        }

#endregion

#region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

#endregion

    }
}
